package com.kcsoft.mapper;

import com.kcsoft.pojo.Classes;
import com.kcsoft.pojo.Message;
import com.kcsoft.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AdminMapper {



    @Update("update dxai.user set username=#{username},password=#{password},stu_id=#{stuId}, class_id=#{classId}, role=#{role} where id=#{id}")
    void updates(User user);

    @Delete("delete from dxai.user where id=#{id}")
    void deleteUser(Integer id);

    void add(String username, String password, String stuId, Integer role, Integer classId);

    @Insert("insert into dxai.assistant (name, assistant, value, description, type) values " +
            "(#{name},#{assistantId},#{value},#{description}, #{type})")
    void addModel(String name, String assistantId, Integer value, String description,String type);

    @Delete("delete from dxai.assistant where id=#{id}")
    void delModel(Integer id);

    List<Classes> listClasses();

}
